var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(e, t) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(e, t) {
        e.__proto__ = t;
    } || function(e, t) {
        for (var i in t) t.hasOwnProperty(i) && (e[i] = t[i]);
    })(e, t);
}, function(e, t) {
    function i() {
        this.constructor = e;
    }
    o(e, t), e.prototype = null === t ? Object.create(t) : (i.prototype = t.prototype, 
    new i());
}), a = this && this.__decorate || function(e, t, i, r) {
    var o, p = arguments.length, a = p < 3 ? t : null === r ? r = Object.getOwnPropertyDescriptor(t, i) : r;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, r); else for (var s = e.length - 1; 0 <= s; s--) (o = e[s]) && (a = (p < 3 ? o(a) : 3 < p ? o(t, i, a) : o(t, i)) || a);
    return 3 < p && a && Object.defineProperty(t, i, a), a;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("LoadManager"), s = e("enum"), c = cc._decorator, l = c.ccclass, d = c.property, u = function(t) {
    function e() {
        var e = null !== t && t.apply(this, arguments) || this;
        return e.iconSprite = null, e.titleLabel = null, e.propsLabel = null, e.isStart = !1, 
        e;
    }
    return i(e, t), e.prototype.start = function() {
        this.isStart = !0;
    }, e.prototype.init = function(e) {
        var t = "";
        switch (e.type) {
          case s.EquipPropType.ATK_P:
            t = "image/equip/icon/杀伤力@2x", this.titleLabel.string = "攻击加成", this.propsLabel.string = e.value + "%";
            break;

          case s.EquipPropType.MOVE_P:
            t = "image/equip/icon/移动速度@2x", this.titleLabel.string = "移动加成", this.propsLabel.string = e.value + "%";
            break;

          case s.EquipPropType.RAN_P:
            t = "image/equip/icon/攻击距离@2x", this.titleLabel.string = "距离加成", this.propsLabel.string = e.value + "%";
            break;

          case s.EquipPropType.CRI_P:
            t = "image/equip/icon/暴击率@2x", this.titleLabel.string = "暴击率", this.propsLabel.string = e.value + "%";
            break;

          case s.EquipPropType.MISS_P:
            t = "image/equip/icon/闪避率@2x", this.titleLabel.string = "闪避率", this.propsLabel.string = e.value + "%";
            break;

          case s.EquipPropType.COOL_P:
            t = "image/equip/icon/技能间隔@2x", this.titleLabel.string = "冷却加成", this.propsLabel.string = e.value + "%";
            break;

          case s.EquipPropType.HP_V:
            t = "image/equip/icon/生命@2x", this.titleLabel.string = "生命", this.propsLabel.string = e.value.toString();
        }
        "" != t && this.isStart && r.default.getInstance().loadSpriteFrame({
            url: t,
            sprite: this.iconSprite
        });
    }, a([ d(cc.Sprite) ], e.prototype, "iconSprite", void 0), a([ d(cc.Label) ], e.prototype, "titleLabel", void 0), 
    a([ d(cc.Label) ], e.prototype, "propsLabel", void 0), a([ l ], e);
}(cc.Component);

n.default = u;